package nl.rainbowsheep.reisorg.rest.service.model;

import com.fasterxml.jackson.annotation.JsonIgnore;
import java.io.Serializable;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * Accommodations belonging to a accommodationTrip.
 */
@Entity
@Table(name="trip_accommodations")
public class TripAccommodation implements Serializable{
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "trip_accommodation_id")
    private long id;
    
    
    //@Column(name = "trip_fk")
//    private Long tripId;
    
    @ManyToOne
    @JoinColumn(name="trip_fk")
    @JsonIgnore
    private Trip accommodationTrip; 
    
    @Column(name = "accommodation_fk")
    private Long accommodationId;
    
    @Column(name="amount_nights")
    private int amountOfNights; 
    
    @Column(name="index_for_accommodation")
    private int accommodationIndex;

    public long getId() {
        return id;
    }

    public void setId(long id) {
        this.id = id;
    }

    public Trip getAccommodationTrip() {
        return accommodationTrip;
    }

    public void setAccommodationTrip(Trip accommodationTrip) {
        this.accommodationTrip = accommodationTrip;
    }
    
//    public Long getTripId() {
//        return tripId;
//    }
//
//    public void setTripId(Long tripId) {
//        this.tripId = tripId;
//    }

    public Long getAccommodationId() {
        return accommodationId;
    }

    public void setAccommodationId(Long accommodationId) {
        this.accommodationId = accommodationId;
    }

    public int getAmountOfNights() {
        return amountOfNights;
    }

    public void setAmountOfNights(int amountOfNights) {
        this.amountOfNights = amountOfNights;
    }

    public int getAccommodationIndex() {
        return accommodationIndex;
    }

    public void setAccommodationIndex(int accommodationIndex) {
        this.accommodationIndex = accommodationIndex;
    }
    
    
}
